< previous page page_75 next page >

Page 75
display other forms when needed. Any of the different styles can have multiple forms. The big difference with the MDI application is that it uses a controlling form (better known as a parent form) to hold the other forms (child forms) that can't appear outside the parent form's boundaries. In SDI applications, you can have as many instances of a form as you need, yet no form is a child of another.
To see how the different application styles operate, you'll build a simple Notepad-style application by using each of the three design styles.
SDI
When you use an SDI application design, what you create will contain a single form with a toolbar, menu, and other functions or features you choose to add. In fact, many of the applications that you'll create will consist of a series of independent forms. Each form is displayed separately from any other forms onscreen and is moved or resized independently. With this type of interface, there's no easy way to organize the forms into a group. Even with this limitation, it's still the interface of choice for many applications that you might use.
When using the SDI design to create a Notepad application, you'll work with only one form and add the needed controls to it. Although using the SDI design to create the actual interface is easy, SDI is the hardest type to use because the form that users interact with must be coded with great care to provide all the features users will need.
To see how an SDI application is created, start a new project and name it SDINotePad. Then, name the form frmSDINote. Now add to this form a single TextBox control named txtInput. The form in Figure 3.5 has the TextBox control on it and a simple menu defined.
12181-0075a.gif
Figure 3.5.
Creating the SDI application is as
simple as one text box and a menu.

 
< previous page page_75 next page >

If you like this book, buy it!